package com.wjx.zk

import org.apache.curator.framework.recipes.atomic.DistributedAtomicInteger
import org.apache.curator.retry.RetryNTimes

fun main(args: Array<String>) {
    val zk = getInstance()
    val path = "/disAtomicInt"
    val atomicInt = DistributedAtomicInteger(zk, path, RetryNTimes(3, 100))
    val value = atomicInt.add(4)
    println(value.preValue())
    println(value.postValue())
}